$("#form-customerClueDetail-edit").validate({
	rules:{
		xxxx:{
			required:true,
		},
	},
	submitHandler:function(form){
		edit();
	}
});


function edit() {
	var detailId=$("input[name='detailId']").val();
	var detailType=$("input[name='detailType']").val();
	var detailStatus=$("input[name='status']").is(':checked') == true ? 1 : 0;
	var questionId=$("select[name='questionType']").val();
	var questionType=$("input[name='questionType']").val();
    $.ajax({
    	cache : true,
		type : "POST",
		url : ctx + "module/customerClueDetail/save",
		data : {
			"detailId" : detailId,
 			"detailType": detailType,
			"detailStatus": detailStatus,
			"questionId": questionId,
			"questionType": questionType,
		},
		async : false,
		error : function(request) {
			$.modalAlert("系统错误", "error");
		},
		success : function(data) {
			if (data.code == 0) {
				parent.layer.msg("修改成功,正在刷新数据请稍后……",{icon:1,time: 500,shade: [0.1,'#fff']},function(){
					$.parentReload();
				});
			} else {
				$.modalAlert(data.msg, "error");
			}

		}
    });
}